package com.yourcompany.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yourcompany.api.entity.CreditPay;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;

@Mapper
public interface CreditPayMapper extends BaseMapper<CreditPay> {
    
    /**
     * 查询用户的信用支付信息
     */
    CreditPay selectByUserId(@Param("userId") Long userId);
    
    /**
     * 更新用户的可用额度
     */
    int updateAvailableCredit(@Param("userId") Long userId, @Param("amount") BigDecimal amount);
} 